#Print - Video.bi

Type WindowControl
    X               As Integer
    Y               As Integer
    Width           As Integer
    Height          As Integer
    Parent          As Integer      ' Required
    ProgramOwner    As Integer      ' Required
    Name            As String * 128 ' Required
    Name_Length     As UInteger     ' Required
    Type            As Integer      ' Required
    Visible         As UInteger
    Enabled         As UInteger
    Value           As Integer
    Text            As String * 32768
    Text_Length     As UInteger
    Integer1        As Long
    Integer2        As Long
    String1         As String * 32768
    String1_Length  As UInteger
    String2         As String * 32768
    String2_Length  As UInteger
End Type

Type ColorConstants
    Door_Face           As ULong
    Door_Text           As ULong
    Door_Highlight      As ULong
    Door_Shadow         As ULong
    Door_CaptionBar     As ULong
    Door_CaptionText    As ULong
    Button_Face         As ULong
    Button_HighlightIn  As ULong
    Button_ShadowIn     As ULong
    Button_HighlightOut As ULong
    Button_ShadowOut    As ULong
    Button_Text         As ULong
    Button_TextDisabled As ULong
    Button_TextDisabledShadow   As ULong
End Type

Const As Integer GFX_FULLSCREEN = &h01

Common Shared ColorScheme       As ColorConstants

Common Shared UpdateScreen      As Integer

Common Shared UseMenuOpen       As Integer

Common Shared RightClickCounter As Long

Common Shared TotalWindows      As Integer
Common Shared DraggingWindow    As UByte
Common Shared Dragging_Num      As Integer
Common Shared Dragging_StartX   As Integer
Common Shared Dragging_StartY   As Integer
Common Shared TotalControls     As UInteger

Common Shared Window_Controls() As WindowControl

Common Shared Window_Name()     As String
Common Shared Window_Image()    As Any Ptr
Common Shared Window_Redraw()   As UByte
Common Shared Window_ZOrder()   As Integer
Common Shared Window_X1()       As Integer
Common Shared Window_Y1()       As Integer
Common Shared Window_X2()       As Integer
Common Shared Window_Y2()       As Integer
Common Shared Window_Visible()  As UByte
Common Shared Window_Caption()  As String
Common Shared Window_CaptionVisible()   As UByte
Common Shared Window_KBQueue()  As String

Declare Sub AssignColorsToVariables()
Declare Function SetControlProperty(WindowNum As Integer, ControlName As String, PropertyName As String, PropertyValue As String) As Integer
Declare Function SetDoorProperty(WindowNum As Integer, PropertyName As String, PropertyValue As String) As Integer
Declare Function CreateControl(WindowNum As Integer, ProgramOwner As Integer, ControlName As String, ControlType As Integer) As Integer
Declare Sub RedrawControls(WindowNum As Integer)
Declare Function TestInsideDoor(mouseX As Integer, mouseY As Integer) As Integer
Declare Function TestControlClicked(mouseX As Integer, mouseY As Integer) As Integer
Declare Sub DrawScrollbar(DC As Any Ptr, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, Min As Long, Max As Long, Value As Long, State As Integer, Enabled As UByte = 1)
Declare Sub RedrawScreen()
Declare Sub DrawText3D(DC as Any Ptr, X As Integer, Y As Integer, Text As String)
Declare Sub SwitchResolution(ScreenWidth As Integer, ScreenHeight As Integer, ScreenBitsPerPixel As Integer)
Declare Sub Draw3DBox(DC as Any Ptr, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, Inverted As UByte)
Declare Sub DrawTaskbar()
Declare Sub DrawCheckbox(DC As Any Ptr, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, Caption As String, State As UByte, Enabled As UByte = 1)
Declare Sub DrawButton(DC as Any Ptr, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, Caption As String, State As UByte, Enabled As UByte = 1, MaxLines As UByte = 0)
Declare Sub DisplayMultiLineSplitText(DC as Any Ptr, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, Caption As String, maxLines As Integer = 0, Split As String = " ", TextColor As ULong)
Declare Sub DrawDoor(DC As Any Ptr, X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, Caption As String, Visible As UByte)
Declare Function CreateDoor(X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As Integer, WindowName As String, Caption As String) As Integer
Declare Sub RedrawDoors()
Declare Function TestDragging(mouseX As Integer, mouseY As Integer) As Integer
Declare Function BlitDoor(WindowNum As Integer) As Integer
Declare Sub SetZOrderTop(windowNum As Integer)
Declare Function CreateWindow(WindowName As String, WinWidth As Integer, WinHeight As Integer) As Integer
Declare Function GetWindowBufferTotalSize() As ULongInt
Declare Function GetWindowBuffer(WindowName As String) As Any Ptr
Declare Function GetWindowNumber(WindowName As String) As Integer